<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <link rel="stylesheet" type="text/css" href="css/<s:property value="#session.CURRCSS" default="ui01.css"/>">
    <title>My JSP 'LoginPage.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <script type="text/javascript">
<!--
    function langSelecter_onChanged() {
        document.langForm.submit();
    }
    function cssSelecter_onChanged() {
        document.cssForm.submit();
        alert(document.cssSelecter.value);
    }
-->
</script>
  </head>
  
  <body>
<s:set name="SESSION_LOCALE" value="#session['WW_TRANS_I18N_LOCALE']"/>
<s:bean id="locales" name="com.ccp.web.i18n.ChangeLanguage"/>
<form action="<s:url includeParams="get" encode="true"/>" name="langForm" 
    style="background-color: white; padding-top: 4px; padding-bottom: 4px;">
    <s:text name="login.page.language" /> <s:select label="Language" 
        list="#locales.locales" listKey="value"    listValue="key"
        value="#SESSION_LOCALE == null ? locale : #SESSION_LOCALE"
        name="request_locale" id="langSelecter" 
        onchange="langSelecter_onChanged()" theme="simple"/>
</form>

<s:bean id="cssList" name="com.ccp.web.i18n.ChangeCSS"/>
<form action="changeCssSelector.action" name="cssForm" 
    style="background-color: white; padding-top: 4px; padding-bottom: 4px;">
    <s:text name="CSS" /> <s:select label="Css" 
        list="#cssList.cssList" listKey="value"    listValue="key"
        value="#session.CURRCSS==null ? 'ui01.css' : #session.CURRCSS"
        name="selectCss" id="cssSelecter" 
        onchange="cssSelecter_onChanged()" theme="simple"/>
</form>

    <h3><s:text name="login.page.title" /> - <s:property value="selectCss"/></h3>
    <s:form action="login" id="form" theme="simple">
    <table class="tab">
    	<tr>
    	<td width="10%"><s:text name="login.page.uName"/></td>
    	<td><s:textfield name="userName" maxlength="20"/></td>
    	</tr>
    	<tr>
    	<td width="10"><s:text name="login.page.pWord" /></td>
    	<td><s:password name="passWord" maxlength="20"/></td>
    	</tr>
    	<tr>
    	<td width="10"></td>
    	<td><s:submit value="%{getText('login.page.submit')}" /></td>
    	</tr>
    </table>
    </s:form>
  </body>
</html>
